perm filename LECT14.TEX[ARK,TEX] blob
sn#766840 filedate 1984-08-23 generic text, type C, neo UTF8
COMMENT ā VALID 00003 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 % copyright 1984 by Arthur Keller ... All rights reserved
C00003 00003 \section*{Assignment}
C00006 ENDMK
Cā;
% copyright 1984 by Arthur Keller ... All rights reserved
\chapter{Macros 1}
%Thu, August 23
%11am-12n
%Macros 1
%>state changing macros
%>scope
%1-2pm
%<lab assignment 10>
This lecture explains and reviews what we have learned about macros.
\section*{Assignment}
Reading for this lecture:
The {\sl \TeX book}, Chapter~20.
Assignment for this lecture:
You have been writing a lot of letters lately, and you are getting tired
of typing your address at the top of a letter.
Write a macro called \cmd{myaddress} that prints out each line of your
address centered on the page, like this:
\smallskip
\centerline{Dr.~No Fats}
\centerline{Reducing Medicine Department}
\centerline{Stanford University}
\centerline{Stanford, CA 94305 USA}
\smallskip
You just love your new \cmd{myaddress} macro, but you would like to use it to
make a sheet of stick-on address labels for envelopes. Write a
macro that prints your address 21 times on a page, with three columns
and seven rows.
Each label should take up a space that is two inches wide and
one inch high.
The following page illustrates what the page of labels would look like.
\begin{figure}[p]
\newcommand{\sticker}{
\vbox to 1in{
\hbox to 2in{\hfil Dr.~No Fats\hfil}
\hbox to 2in{\hfil Reducing Medicine Dept\hfil}
\hbox to 2in{\hfil Stanford University\hfil}
\hbox to 2in{\hfil Stanford, CA 94305 USA\hfil}
\vfil
}
}
\newcommand{\stickerline}{\hbox{\sticker\sticker\sticker}}
\vbox{
\stickerline
\stickerline
\stickerline
\stickerline
\stickerline
\stickerline
\stickerline
}
\end{figure}